<%@ page contentType="text/html; charset=UTF-8"%>
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ page import="com.veryedu.hibernate.hbm.entity.Film" %>
<%@ taglib prefix="s" uri="/struts-tags" %>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <title>浏览场次</title>
    <link rel="stylesheet" href="../css/icomoon.css" />
	<link rel="stylesheet" href="../css/bootstrap.css" />
	<link rel="stylesheet" href="../css/index.css" />
	<script type="text/javascript" src="../js/jquery-1.10.2.js"></script>
	<script type="text/javascript" src="../js/bootstrap.js"></script>
	<script type="text/javascript" src="../js/icomoon.js"></script>
  </head>
  
  <body>
  	   
    <div class="container"> 
    <div class="navbar navbar-inverse navbar-default" role="navigation">
      <div class="container">
        <div class="navbar-header">
          <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
            <span class="sr-only">Toggle navigation</span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
          </button>
          <a class="navbar-brand" href="#"><h1>VeryEdu 影院订票系统</h1></a>
        </div>
        <div class="navbar-collapse collapse">
          
        </div><!--/.navbar-collapse -->
      </div>
    </div>
    </div>



    <div class="container">			
			<div class="row row-offcanvas row-offcanvas-left">
            	<div class="col-xs-6 col-sm-3 sidebar-offcanvas">
                            
                    <ul class="nav nav-pills nav-stacked">
	                  <li><a href="#"><span class="icon-camera"></span><span class="mls"> 浏览影片</span></a></li>
	                  <li class="active"><a href="#"><span class="icon-bell"></span><span class="mls"> 浏览场次</span></a></li>
	                  <li><a href="#"><span class="icon-users"></span><span class="mls"> 选择座位</span></a></li>                  
	                  <li><a href="#"><span class="icon-coin"></span><span class="mls"> 支付订单</span></a></li>                
	                  <li><a href="#"><span class="icon-numbered-list"></span><span class="mls"> 查看订单</span></a></li>
	                </ul>
                
                </div>
            	<div class="col-xs-12 col-sm-9">
                	<div class="row row-offcanvas row-offcanvas-left">
                    	<div class="col-xs-6 col-sm-5 sidebar-offcanvas">
                            <div class="thumbnail">
                              <img src="${filmTime.filmImg}" class="img-responsive" width="100%">
                              <div class="caption">
                                <h4 class="text-center"><s:property value="#request.filmTime.filmName"/></h4>
                              </div>
                            </div>
                        </div>
                        <div class="col-xs-12 col-sm-7">
                        
                        	<table class="table table-hover">
                            	<th>日期</th>
                            	<th>时间</th>
                            	<th>大厅</th>
                            	<th>票价</th>
                            	<th>操作</th>
                            	<tbody>
                            	<s:iterator value="#request.filmTime.dates" id="showDate">
                            		<s:iterator value="times" id="showTime" status="st">
                            			<s:if test="#st.First">
                            			<tr>
                            				<td rowspan="${times.size()}"><s:property value="date" /></td>
                            				<td><s:property value="time" /></td>
                            				<td><s:property value="roomname" /></td>
                            				<td><s:property value="price" /></td>
                            				<td>
                            				<s:form action="seatList.action" method="get">
                            					<s:hidden name="showTimeId"></s:hidden>
                            					<s:submit value="订票" cssClass="btn btn-primary"/>
                            				</s:form>
                            				</td>
                            			</tr>
                            			</s:if>
                            			<s:else>
                            			<tr>
                            				<td><s:property value="time" /></td>
                            				<td><s:property value="roomname" /></td>
                            				<td><s:property value="price" /></td>
                            				<td>
                            				<s:form action="seatList.action" method="get">
                            					<s:hidden name="showTimeId"></s:hidden>
                            					<s:submit value="订票" cssClass="btn btn-primary"/>
                            				</s:form>
                            				</td>
                            			</tr>
                            			</s:else>
                            		</s:iterator>
                            	</s:iterator>                                
                                </tbody>
                            </table>
                        </div>
                    </div>              
                </div>
		</div>	
		
		
      <hr>
      <footer>
        <p>&copy; Company 2013</p>
      </footer>
    </div> <!-- /container -->
  </body>
</html>
